<template>
    <div class="detailfee">
        <div class="list_wrap">
            <feewrap1 :feelist="feelist" v-if="sType==1"></feewrap1>
            <feewrap2 :feelist="feelist" v-else-if="sType==2"></feewrap2>
            <feewrap3 :feelist="feelist" v-else-if="sType==3"></feewrap3>
            <p class="errordata" v-else>数据格式异常</p>
        </div>
    </div>
</template>

<script>
import feewrap1 from "./fee_info1.vue";
import feewrap2 from "./fee_info2.vue";
import feewrap3 from "./fee_info3.vue";
import { mapGetters } from "vuex";
export default {
    name: "detailfee",
    components: {
        feewrap1,
        feewrap2,
        feewrap3
    },
    props:['t_ctnrId'],
    data() {
        return {
           feelist:[]
        }
    },
    computed:{
        ...mapGetters({
            "sType":'user/sType'
        })
    },
    methods:{
        getfeelist:function(){
            if(!this.t_ctnrId)
            {
                return;
            }
            var _this=this;
            var loading = this.$toast.loading({
              duration:60000,
              message: '加载中...',
              forbidClick: true,
              loadingType: 'spinner'
            });
            this.axios.get('/home/getTransFeeList',{t_ctnrId:this.t_ctnrId}).then((res)=>{
                loading.clear();
                if(res.errno==0)
                {
                    var data= res.data;
                    _this.feelist=data;
                }else{
                    _this.$toast.fail(res.errmsg);
                }
            }).catch((err)=>{
                loading.clear();
            })
        }
    },
    mounted:function(){
        this.getfeelist();
    }
};
</script>

<style lang="less" scoped>
.detailfee{
    width: 100%;
    height: auto;
    .list_wrap{
        width: 100%;
        height: auto;
        background-color: #fff;
        padding-top: .2rem;
        .errordata{
            font-size: .4rem;
            color: #666;
            text-align: center;
            padding: .4rem;
            background-color: #fff;
        }
    }
}
</style>
